import requests



for page in range(1,11):
    print(f'---------------------第{page}页---------------------')
    url = f'https://spa1.scrape.center/api/movie/?limit=10&offset={(page-1)*10}'
    response = requests.get(url)
    datas = response.json()['results']
    for data in datas:
        id = data['id']
        name = data['name']
        img_url = data['cover']
        score = data['score']
        detail_url = f'https://spa1.scrape.center/detail/{id}'
        detail_json_url = f'https://spa1.scrape.center/api/movie/{id}/'
        response = requests.get(detail_json_url)
        # 获取剧情简介
        print(name,response.json()['drama'])
